﻿<!DOCTYPE html>
<?php
	ini_set('session.cookie_lifetime', 60 * 60 * 24 * 60);  // 60 day cookie lifetime
	session_start();
?>
<html>
    <head>
        <meta charset="utf-8" />
		<title>Altura Running</title>

		<script>
			function ajax(url){
				try{
					 xmlhttp = new XMLHttpRequest();
				}catch(ee){
					 try{
						  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
					 }catch(e){
						  try{
								xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
						  }catch(E){
								xmlhttp = false;
						  }
					 }
				}
				xmlhttp.open("GET",url,true);
				xmlhttp.onreadystatechange=function() {
					if (xmlhttp.readyState==4){
						texto= xmlhttp.responseText;
						document.getElementById('principal').innerHTML= texto;
					}
					else{
						document.getElementById('principal').innerHTML= "Carregando..."+url;
					} 
				}
				xmlhttp.send(null);
			}
		</script>
	</head>

	<body>
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="335"><img src="../images/logo.jpg" width="335" height="161" border="0" usemap="#Map"></td>
			<td align="right" valign="top" background="../images/bg.jpg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td height="100"><strong> <a href="#">Home</a> | <a href="#">Support</a></strong></td>
			  </tr>
			</table>      <p>
			  <input name="textfield" type="text" value="Search">
			  <input type="submit" name="Submit" value="Go">
			  <input type="button" onclick = "location.href='../logout.php'" name="Submit" value="Logout">
			</p>
			</td>
		  </tr>
		</table>
		<table width="100%"  border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td width="10" bgcolor="#CCCCCC"><p>&nbsp;</p>
			<p>&nbsp;</p></td>
			<td bgcolor="#333333"><h2>&nbsp;<a href="#">Exercicios</a></h2></td>
			
			<td width="10" bgcolor="#CCCCCC"><p>&nbsp;</p>
			<p>&nbsp;</p></td>
			<td bgcolor="#333333"><h2>&nbsp;<a href="#">Configurações</a></h2></td>

			<td width="10" bgcolor="#CCCCCC"><p>&nbsp;</p>
			<p>&nbsp;</p></td>
			<td bgcolor="#333333"><h2>&nbsp;<a href="#">Blog</a></h2></td>	
		  </tr>
		</table>
		<table width="100%"  border="0" cellpadding="5" cellspacing="0" bgcolor="#CCCCCC">
		  <tr valign="top">
			<td width="160"><table width="100%"  border="0" cellspacing="1" cellpadding="5">
			  <tr>
				<td bgcolor="#333333"><strong>Projetos</strong></td>
			  </tr>
			  <tr>
				<td bgcolor="#ffffff">&bull; <a href="#" onclick="ajax('calendar.php')">Calendário</a></td>
			  </tr>
			  <tr>
				<td bgcolor="#ffffff">&bull; <a href="#">Projeto2</a></td>
			  </tr>
			  <tr>
				<td bgcolor="#ffffff">&bull; <a href="#">Projeto3</a></td>
			  </tr>
			  <tr>
				<td bgcolor="#ffffff">&bull; <a href="#">Projeto4</a></td>
			  </tr>
			</table>
			  <br>  
			  <table width="100%"  border="0" cellspacing="1" cellpadding="5">
				<tr>
				  <td bgcolor="#333333"><strong>Ordens</strong></td>
				</tr>
				<tr>
				  <td bgcolor="#ffffff">&bull; <a href="#">Ordem1</a></td>
				</tr>
				<tr>
				  <td bgcolor="#ffffff">&bull; <a href="#">Ordem2</a></td>
				</tr>
				<tr>
				  <td bgcolor="#ffffff">&bull; <a href="#">Ordem3</a></td>
				</tr>
				<tr>
				  <td bgcolor="#ffffff">&bull; <a href="#">Ordem4</a></td>
				</tr>
			  </table>
			<p>&nbsp;</p></td>
			<td><div id="principal">

			  <?php echo $_SESSION["user_name"]; ?>
			</div></td>
		  </tr>
		</table>
		<hr size="1" noshade>

		<div style="font-size: 1em; text-align: center; margin-top: 1.0em; margin-bottom: 1.0em;">
		Design by José Rogério.
		</div>
	</body>
</html>
